Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle PAX connection timeout #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hunkydoryrepair
Copy link

Pax TCP connected device may time out. when that happened, the client remained set but stream was not, which would result in the subsequent calls to the API failing with NullPointerException. Only solution was to create a new Device for each transaction.

This adds a catch around the potential connection timeout to reset the client, allowing the Device to be saved and reused for multiple transactions.

This also adds some minimal thread support, so that if Cancel is called while it is waiting to connect, it throws a meaningful error instead of a NullPointerException.

The PAX D190 is mobile and shuts off frequently, and doesn't accept connections, making these issues important for supporting the D190.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant